<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<body>
<div class="container">
<section>
<div id="container_demo" >
<div id="wrapper">
<div id="login" class="animate form">   
                 
<%-- <form:form method="post" action="loginaBaieztatu.html"  commandName="erabiltzaile">

		<h1><spring:message code="label.login"/></h1>
		<form:label path="erabiltzailea" data-icon="u"><spring:message code="label.erabiltzailea"/></form:label>
		<form:input path="erabiltzailea" required="required" type="text" placeholder="myusername or mymail@mail.com"/>
		<form:label path="pasahitza" data-icon="p"><spring:message code="label.pasahitza"/></form:label>
		<form:input path="pasahitza" required="required" type="password" placeholder="pasahitza sartu"/>
	
		<p class="signin button"> 
		<input type="submit" value="<spring:message code="label.login"/>"/>
		</p>
		<p class="change_link">
			<spring:message code="label.kidea"/><a href="erregistratu" class="erabiltzaile"><spring:message code="label.batu"/></a>
		</p>
			
			
</form:form>  --%>
<form name='f' action="<c:url value='j_spring_security_check' />" method='POST'>

		<h1><spring:message code="label.login"/></h1>
		<label data-icon="u"><spring:message code="label.erabiltzailea"/></label>
		<input name="j_username" required="required" type="text" placeholder="myusername or mymail@mail.com"/>
		<label data-icon="p"><spring:message code="label.pasahitza"/></label>
		<input name="j_password" required="required" type="password" placeholder="pasahitza sartu"/>
	
		<p class="signin button"> 
		<input type="submit" name="submit" value="<spring:message code="label.login"/>"/>
		</p>
		<p class="change_link">
			<spring:message code="label.kidea"/><a href="erregistratu" class="erabiltzaile"><spring:message code="label.batu"/></a>
		</p>
			
			
</form>

	<p><c:if test="${error==true}">
		<p>T</p>
		<p>E</p>
		<p>S</p>
		<p>T</p>
		<div class="errorblock">
			<p>
			Your login attempt was not successful, try again.<br /> Caused :
			${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
			</p>
		</div>
	</c:if></p>


</div>
</div>
</section>
</div>	
</body>